import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp,IonicModule,IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';
import {HttpClientModule} from "@angular/common/http";
// import {Http} from '@angular/http';//引入Http服务
import {HttpService} from "../providers/HttpService";
import {StorageService} from "../providers/StorageService";
import {UserService} from "../providers/UserService";
import {AppContentService} from "../providers/AppContentService";
import {SportService} from "../providers/SportService";


import { SportPage } from '../pages/sport/sport';
import { UsercenterPage } from '../pages/usercenter/usercenter';
import { HomePage } from '../pages/home/home';
import { TabsPage } from '../pages/tabs/tabs';
import { WelcomePage } from '../pages/welcome/welcome';
//登陆页、注册页
import {Signup} from '../pages/signup/signup';
import {Login} from '../pages/login/login';
import {SignOrlogin} from '../pages/sign-orlogin/sign-orlogin'
//活动发布页
import {PublishSport} from '../pages/publish-sport/publish-sport';
//活动详情页
import {SportDetailPage} from "../pages/sport-detail/sport-detail";
//用户个人信息页
import {PubMoreInfoPage} from "../pages/pub-more-info/pub-more-info";

import { HeadfacePage } from '../pages/headface/headface';
import {UserInfoPage} from '../pages/user-info/user-info';

import { ScanPage } from "../pages/scan/scan";

import {MySportsPage} from "../pages/my-sports/my-sports";

import {JoinSportPersonPage} from "../pages/join-sport-person/join-sport-person";
//model层
import {UserInfo} from "../model/UserInfo";
import {SportModel} from "../model/SportModel";

import {VersionsPage} from "../pages/versions/versions";

import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
// import { Network } from '@ionic-native/network';

//上传图片驱动
import { File } from '@ionic-native/file';
import { FileTransfer, FileTransferObject } from '@ionic-native/file-transfer';
import { FilePath } from '@ionic-native/file-path';
import { Camera } from '@ionic-native/camera';
//二维码组件
import { QRScanner } from '@ionic-native/qr-scanner';
//app版本组件
import {AppVersion} from "@ionic-native/app-version";
//定位组件
import { Geolocation } from '@ionic-native/geolocation';
// import { RestProvider } from '../providers/rest/rest';
import {BackButtonService} from "../service/backButton.service";
import {CheckUtil} from "../common/CheckUtil";
import { CityPickerModule } from  "ionic2-city-picker"
import {CityPickerService} from "../providers/CityPickerService";

@NgModule({
  declarations: [
    MyApp,
    SportPage,
    UsercenterPage,
    HomePage,
    WelcomePage,
    SignOrlogin,
    Signup,
    Login,
    PublishSport,
    SportDetailPage,
    TabsPage,
    UserInfoPage,
    HeadfacePage,
    ScanPage,
    VersionsPage,
    PubMoreInfoPage,
    MySportsPage,
    JoinSportPersonPage
  ],
  imports: [
    BrowserModule,
    HttpClientModule,
    CityPickerModule,
    // IonicModule.forRoot(MyApp),
      IonicModule.forRoot(MyApp,{
         tabsHideOnSubPages: 'true'         //隐藏全部子页面tabs
      })
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    SportPage,
    UsercenterPage,
    HomePage,
    WelcomePage,
    SignOrlogin,
    Signup,
    Login,
    PublishSport,
    SportDetailPage,
    TabsPage,
    UserInfoPage,
    HeadfacePage,
    ScanPage,
    VersionsPage,
    PubMoreInfoPage,
    MySportsPage,
    JoinSportPersonPage
  ],
  providers: [
    StatusBar,
    SplashScreen,
    {provide: ErrorHandler, useClass: IonicErrorHandler},
    HttpService,StorageService,UserService,AppContentService,SportService,//自定义请求服务
    BackButtonService,
    // Network,//网络
    UserInfo,
    SportModel,
    CheckUtil,
    CityPickerService,


    File,
    FileTransfer,
    FilePath,
    Camera,
    QRScanner,
    AppVersion,
    Geolocation
  ]
})
export class AppModule {}
